package Day7;

import org.junit.Test;

import java.util.Arrays;

public class Test2 {

    @Test
    public void test01() {
        int maxValue = Integer.MAX_VALUE;
        System.out.println(maxValue);
        //转二进制
        String binaryString = Integer.toBinaryString(maxValue);
        System.out.println(binaryString);
        String hexString = Integer.toHexString(maxValue);
        System.out.println(hexString);
        //将数组组成的数组转成整形
        String str="123";
        //将字符串转成整形
        int i = Integer.parseInt(str);
        System.out.println(i);

    }

    @Test
    public void test02(){
        Integer[] arr={23,34,3,54,4,32,234,2,2134,3245};
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));

        Arrays.sort(arr,(a,b)->b-a);
        System.out.println(Arrays.toString(arr));
    }


}
